<?php $this->load->view('admin_home/_header') ?>
<?php $this->load->view('message') ?>
<script type="text/javascript">
  $().ready(function(){
    $("#school_li").addClass("active");    
  });

    function delete_item(id)
    {
        if(confirm("将删除该管理员，删除后不可恢复，确定吗？"))
            location.href="<?php echo site_url('admin_school/school_admin_delete') . '/' ?>"+id;
    }
</script>
<script>
var x = document.getElementById("myDialog"); 
function showDialog(){ 
	x.show(); 
} 
function closeDialog(){
	x.close(); 
} 
</script>
<div class="container">
    <div class="col-md-3">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title">学校信息</h3>
            </div>
             <div class="panel-body">
                <div class="row form-group" style="border-bottom:1px ridge;">
                  <label  class="col-lg-5 control-label">名称</label>
                  <div class="col-lg-7">
                    <label  class="ontrol-label"><?= $school['name'] ?></label>
                  </div>
                  <div class="col-lg-7">
                  <a href="<?php echo site_url('admin_school/editSchool')?>">修改</a>
                  </div>
                </div>
                <div class="row form-group" style="border-bottom:1px ridge;">
                  <label  class="col-lg-5 control-label">教师</label>
                  <div class="col-lg-7">
                        <label  class="ontrol-label"><?= $teacher_count ?></label>
                  </div>
                </div>
                 <div class="row form-group" style="border-bottom:1px ridge;">
                  <label  class="col-lg-5 control-label">班级</label>
                  <div class="col-lg-7">
                        <label  class="ontrol-label"><?= $logic_class_count ?></label>
                  </div>
                </div>
                <div class="row form-group" style="border-bottom:1px ridge;">
                  <label  class="col-lg-5 control-label">学生</label>
                  <div class="col-lg-7">
                        <label  class="ontrol-label"><?= $student_count ?></label>
                  </div>
                </div>
               
            </div>
        </div>
    </div>
    <div class="col-md-9">
            
            <div class="row">
                <?php if ($teachers_for_check) { ?>
                    
                        <div class="panel panel-primary">
                            <div class="panel-heading">
                                <h3 class="panel-title">
                                    待审核教师列表
                                </h3>
                            </div>
                            <div class="panel-body">
                                <div id="table">
                                    <table class="table table-striped table-hover ">
                                        <thead>
                                            <tr>
                                                <th>序号</th>
                                                <th>姓名</th>
                                                <th>工号</th>
                                                <th>专业</th>
                                                <th>操作</th>
                                                <th></th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php $index = 1; ?>
                                            <?php foreach ($teachers_for_check as $item) : ?>
                                            <tr>
                                                <td>
                                                    <?php echo $index++; ?></td>
                                                <td>
                                                    <?php echo $item['name'] ?></td>
                                                <td>
                                                    <?php echo $item['teacher_number'] ?></td>
                                                <td>
                                                    <?php echo $item['major_name'] ?></td>
                                                <td></td>
                                                <td>
                                                    <a href="<?php echo site_url('admin_school/teacher_y') . '/' . $item['id'] ?>" class="btn btn-success">
                                                    通过
                                                    </a>
                                                </td>
                                                <td>
                                                    <a href="<?php echo site_url('admin_school/teacher_n') . '/' . $item['id'] ?>" class="btn btn-danger">
                                                    拒绝
                                                    </a>
                                                </td>
                                            </tr>
                                            <?php endforeach; ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    
                <?php 
            } else { ?>
                    暂无需要审核的教师
                <?php 
            } ?>
            </div>
    </div>
</div>
<?php $this->load->view('admin_home/_footer') ?>